<template>
  <div>
    <div id="box">
      <i v-for="(item, index) in arr" :key="index">
        <input type="checkbox" :value="item" v-model="sum"/>
        {{ item }}
      </i>
    </div>
    <br>
    <h3>累加和为:{{total}}</h3>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: [10, 33, 44, 55, 66, 77, 88, 99, 108],
      sum:[]
    };
  },
  computed: {
    total(){
      return this.sum.reduce((s,item) => s+=item,0)
    }
  }
};
</script>

<style>
</style>